package com.jxm.hutools;

import cn.hutool.core.util.NumberUtil;
import org.junit.Test;

/**
 * @Author: jxm
 * @Description:
 * @Date: 2023-12-18 16:21
 * @Version: 1.0
 */
public class NumberUtilTest {

    @Test
    public void test1(){
        double te1=123456.123456;
        double te2=123456.128456;
        System.out.println(NumberUtil.round(te1, 4));
    }

    @Test
    public void test2(){
        long c=299792458;//光速
        String format = NumberUtil.decimalFormat(",###", c);//299,792,458
        System.out.println(format);
    }

}
